import {BASE_URL} from '../ajax.js'

export function editgoods(id,filepath, spmc,sptpcflj,spdj,basetypeId,shopId,appendtypeId) {
	return uni.uploadFile({
						    url: BASE_URL+"/supermarket/goods/updateGoodsUp"+'?goodsID='+id+'&spmc='+spmc+'&sptpcflj='+sptpcflj+'&spdj='+spdj+'&basetypeId='+basetypeId+'&appendtypeId='+appendtypeId+'&shopID='+shopId, //
				            filePath: filepath,
				            name: 'file',
				            success: (uploadFileRes) => {
								let pages = getCurrentPages();
								let beforePage = pages[pages.length - 2];
								beforePage.$vm.reFresh = Math.random()
								uni.navigateBack();
				                console.log(uploadFileRes.data);
				            },
										})
	/* return uni.request({
						    url: BASE_URL+"/supermarket/goods/updateGoodsUp"+'?goodsID='+id+'spmc='+spmc+'&spdj='+spdj+'&basetypeId='+basetypeId+'&appendtypeId='+appendtypeId+'&shopID='+shopId, //
				            filePath: filepath,
				            name: 'file',
				            
							method:'POST',
							success: (uploadFileRes) => {
				                console.log(uploadFileRes.data);
				            },
										}) */
										
										
										
										
										
										
										
										
										}